<!DOCTYPE html>
<html lang="">

<head>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport"
    content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no,viewport-fit=cover" />
  <link rel="icon" href="<%= BASE_URL %>ico.png" />
  <title>
    <%= htmlWebpackPlugin.options.title %>
  </title>
  <style>
    #loader-wrapper {
      width: 100vw;
      height: 100vh;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
    }
  </style>
</head>

<body>
  <div id="app">
    <div id="loader-wrapper">
      <img src="./loudou.gif" alt="" width="50px" style="margin-bottom: 10px;">
      <div class="load_title">正在加载中,请耐心等待...
      </div>
    </div>
  </div>
  <!-- <script src="https://api.tianditu.gov.cn/api?v=4.0&tk=136aa3f85f069373cdf997088590ea5d"
    type="text/javascript"></script> -->
  <!-- <script src="https://cdn.bootcss.com/vConsole/3.3.0/vconsole.min.js"></script> -->
  <!-- <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=o3rIKa0I3thGV2XnHHI5ktLmpjcEbCxI"></script>
  <script type="text/javascript" src="https://webapi.amap.com/maps?v=2.0&key=2677176bd3ec4874b0e4ef4cc7af06e7&plugin=AMap.CircleEditor"></script> -->

  <!-- <script type="text/javascript">
    let vConsole = new VConsole();
  </script> -->

  <script>
    document.addEventListener("gesturestart", function (event) {
      event.preventDefault();
    });
  </script>
  
  <script>
    document.addEventListener("plusready", () => {
      let first = null;
      const webview = plus.webview.currentWebview();
      plus.key.addEventListener("backbutton", () => {
        webview.canBack((e) => {
          var url = window.location.hash;
          if (
            e.canBack &&
            url != "#/home/index" &&
            url != "#/home/follow" &&
            url != "#/home/chat" &&
            url != "#/home/releaseindex" &&
            url != "#/home/me"
          ) {
            webview.back();
          } else if (
            url === "#/home/index" ||
            url === "#/home/follow" ||
            url === "#/home/chat" ||
            url === "#/home/releaseindex" ||
            url === "#/home/me"
          ) {
            if (!first) {
              first = new Date().getTime();
              plus.nativeUI.toast("再按一次退出应用", {
                duration: "short",
              });
              setTimeout(() => {
                first = null;
              }, 1000);
            } else {
              if (new Date().getTime() - first < 1000) {
                plus.runtime.quit();
              }
            }
          } else {
            if (!first) {
              first = new Date().getTime();
              plus.nativeUI.toast("再按一次退出应用", {
                duration: "short",
              });
              setTimeout(() => {
                first = null;
              }, 1000);
            } else {
              if (new Date().getTime() - first < 1000) {
                plus.runtime.quit();
              }
            }
          }
        });
      });
    });
  </script>
</body>

</html>